from selenium import webdriver

#初始化driver
def initDriver(brower="chrome",isMaximize=True,timeout=10):
    brower=brower.lower()
    driver=None
    if brower=="chrome":
        driver = webdriver.Chrome()
    elif brower=="firefox":
        driver=webdriver.Firefox()
    elif brower=="ie":
        driver=webdriver.Ie()

    if isMaximize:
        driver.maximize_window()

    driver.implicitly_wait(timeout)
    return driver